In communications across a network, various network devices may monitor or control the flow of data packets that are sent from one device to another. For example, a router or a firewall may actively monitor incoming data packets that are sent from a first user device (e.g., computing device) to a second user device. The router or firewall may, in some instances, scan these incoming data packets for viruses. If any viruses are detected, the router or firewall may temporarily or permanently block further incoming traffic that is received from the first user device.
In some cases, the network device may process and/or store data packets using available memory buffers that are allocated by the network device. These available memory buffers may be included within a “free list” of buffers. During data processing, multiple processes, or multiple threads of execution, may need to access the “free list” of buffers over time. For example, these processes may need to remove available buffers from, or add available buffers to, the “free list” when processing data. Because multiple different processes may access the list, it is possible that two or more processes may attempt to access the list at substantially the same time. In order to avoid any such conflict, each process typically needs to lock the list during access, and then subsequently unlock the list. Any other processes are unable to access the list while it is locked.